package com.example.demo.service;

import com.example.demo.mapper.UserMapper;
import com.example.demo.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 郝文雪
 * @date 2022/7/16 13:47
 * @Description Test
 */
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    /**
     * 根据用户id查询对象
     * @param id
     * @return
     */
    public UserInfo getUserById(Integer id){
        return userMapper.getUserById(id);
    }
}
